package pri.controller;

import java.util.UUID;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import pri.entity.Info;
import pri.service.InfoServiceImpl;

@RestController
public class PriController {
	
	@RequestMapping("/pri")
	public Object  getPri() {
		return "提供";
	}
	
	@GetMapping("/pri/get2")
	public Object  getPri2() {
		return "提供2";
	}

	
	@Autowired
	private InfoServiceImpl  infoService;
	
	@GetMapping("/insert")
	private Object insert() {
		Info info = new Info();
		info.setMsg("info: "+UUID.randomUUID().toString());
	  return 	infoService.insert(info);
	}
}
